﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;

namespace AMS.Inventory.PCClient.InventoryHelpClass
{
    public  class LoginUser
    {
        SqlDb m_Db = new SqlDb();

        private  static string _UserCode;

        public static string UserCode
        {
            get { return _UserCode; }
            set { _UserCode = value; }
        }
   
        public string GetUserNameByCode(string strCode)
        {
            DataSet ds = m_Db.GetDataSet("select Name From Frame_User where Code ='" + strCode + "'");
            if(ds != null && ds.Tables[0].Rows.Count > 0)
            {
                return ds.Tables[0].Rows[0]["Name"].ToString();
            }
            return "";
        }
    }
}